cmake_minimum_required(VERSION 3.5)

project(snarkvm_cuda)
enable_language(CUDA)

find_package(CUDA REQUIRED)

set(CMAKE_CUDA_FLAGS "-rdc=true -arch=sm_75 --std=c++14")
add_library(cuda_lib cu/chacha.cu cu/CuString.cu cu/CuDebug.cu cu/CuVariant.cu cu/CuVector.cu cu/exectuor.cu cu/Field.cu 
    cu/merkle.cu cu/psd2.cu cu/rand.cu cu/types.cu cu/worker.cu)

find_package(Qt5Core REQUIRED)
find_package(Qt5Network REQUIRED)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(snarkvm_cuda_SOURCES    
    main.cpp)

add_executable(snarkvm_cuda ${snarkvm_cuda_SOURCES})
target_link_libraries(snarkvm_cuda 
    Qt5::Core
    Qt5::Network
    cuda_lib
    cudart)
set_target_properties(snarkvm_cuda PROPERTIES CUDA_RESOLVE_DEVICE_SYMBOLS ON)